package com.liming.common.pojo.dto.product;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.liming.common.serializer.YuanToCentDeserializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author liming
 * @date 2025/1/16
 */
@Data
@Schema(description = "新增商品参数")
public class AddProductDTO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "商品名称", defaultValue = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String name;

    @Schema(description = "商品型号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String modelNumber;

    @Schema(description = "商品售价", requiredMode = Schema.RequiredMode.REQUIRED)
    @JsonDeserialize(using = YuanToCentDeserializer.class)
    private Integer price;

    @Schema(description = "商品原价", requiredMode = Schema.RequiredMode.REQUIRED)
    @JsonDeserialize(using = YuanToCentDeserializer.class)
    private Integer originalPrice;

    @Schema(description = "品牌ID", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long brandId;

    @Schema(description = "品牌名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String brandName;

    @Schema(description = "分类ID", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long categoryId;

    @Schema(description = "分类名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String categoryName;

    @Schema(description = "商品主图链接地址", requiredMode = Schema.RequiredMode.REQUIRED)
    private String mainImageUrl;

    @Schema(description = "商品详情图片链接地址列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String detailImagesUrl;

    @Schema(description = "商品视频链接地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String videoLink;

    @Schema(description = "商品参数信息", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String parameters;

    @Schema(description = "商品功能特点介绍内容", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String features;

}
